#include<bits/stdc++.h>
using namespace std;
#define ll long long
 
vector<int> searchposition(vector<int> nums,int target){
    int resl=-1,rear=-1
    int l=0;
    int r=nums.size()-1;
    while(l<=r){
        int mid=(l+r)>>1;
        if(nums[mid]<target){
            l=mid+1;
        }
        else{
            r=mid-1;
        }
    }
    if(l<nums.size()&&nums[l]==target){
        int L=l;
        int R=nums.size()-1;
        while(L<=R){
            int MID=(L+R)>>1;
            if(nums[MID]<=target){
                L=MID+1;
            }else{
                R=MID-1;
            }
        }
        return {l,R};
    }

    return {-1,-1};
}